<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .HolyGrail{
            display: flex;
            flex-direction: column;
            /* 最小高度 没被盒子撑开也是这个高度 */
            min-height: 100vh;
        }
        header,main,nav,aside,footer{
            border: 1px dashed red;
        }
        header,footer{
            flex: 1;
        }
        .body{
            flex: 2;
            display: flex;
        }
        .body .content{
            flex: 1;
        }
        .nav,.aside{
            flex: 0 0 12em
        }
      
    </style>
</head>

<body class="HolyGrail">
    <header>header</header>
    <div class="body">
        <nav class="nav">nav</nav>
        <main class="content">main</main>
        <aside class="aside">asid</aside>
    </div>
    <footer>footer</footer>
</body>

</html>